﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Miris.HumanMilkAnalyser.DataModel;

namespace Miris.HumanMilkAnalyser.Service.Interface
{
    public interface IAnalysisResultService : IService<AnalysisResult>
    {
        /// <summary>
        /// Get the all analysis result count based on provided patient number.
        /// </summary>
        /// <param name="patientNumber">The provided patient number and its related analysis result count will be returned.</param>
        /// <returns>All analysis result count based on provided patient number.</returns>
        int GetAllAnalysisCount(string patientNumber);

        /// <summary>
        /// Get the last analysis result based on provided patient number.
        /// </summary>
        /// <param name="patientNumber">The provided patient number and its related analysis result will be returned.</param>
        /// <returns>The last analysis result based on provided patient number. NULL will be returned if no matched data.</returns>
        AnalysisResult GetLastAnalysisResult(string patientNumber);

        /// <summary>
        /// Get all related AnalysisResults by provided patient number and return the specified rows.
        /// </summary>
        /// <param name="patientNumber">The provided patient number.</param>
        /// <param name="rowCount">How many rows will be returned.</param>
        /// <returns>AnalysisResult list contains all related AnalysisResults.</returns>
        IList<AnalysisResult> GetAllRelatedTestResultsByPatientNumber(string patientNumber, int? rowCount);
    }
}
